const { readFile } = require("fs");

readFile(__dirname+'/demo.txt',(err,data)=>{
  if(err){
    console.log('文件读取失败'+err);
  }else{
    console.log(data.toString());
  }
})